-
Notifications
You must be signed in to change notification settings - Fork 633
[MNY-341] Payment Details UI improvements #8576
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: 56a1c0a The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
WalkthroughVisual and layout updates to Bridge payment-details and related ConnectWallet UI components, plus a changeset and test fixture restructuring for PaymentMethod objects; no public API behavior changes reported. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (1)
Comment |
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
size-limit report 📦
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #8576 +/- ##
==========================================
+ Coverage 54.47% 54.50% +0.03%
==========================================
Files 922 922
Lines 61361 61386 +25
Branches 4149 4171 +22
==========================================
+ Hits 33425 33459 +34
+ Misses 27835 27826 -9
Partials 101 101
🚀 New features to boost your workflow:
|
Merge activity
|
<!--
## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"
If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):
## Notes for the reviewer
Anything important to call out? Be sure to also clarify these in your comments.
## How to test
Unit tests, playground, etc.
-->
<!-- start pr-codex -->
---
## PR-Codex overview
This PR focuses on improving the Payment Details UI for bridge widget components in the `thirdweb` package, enhancing layout, styling, and functionality.
### Detailed summary
- Adjusted `padding` in `TokenBalanceRow.tsx`.
- Replaced `OutlineWalletIcon` with a styled `Container` in `WalletRow.tsx`.
- Updated `borderRadius` and `borderBottom` styles in `PaymentOverview.tsx`.
- Enhanced `StepConnectorArrow` styles and added `iconSize` for `ChevronDownIcon`.
- Modified `OutlineWalletIcon` definition to accept `size`, `color`, and `style` props.
- Refactored `cryptoPaymentMethod` and `ethCryptoPaymentMethod` structures for clarity.
- Updated `PaymentDetails.tsx` styles, including `gap`, `borderRadius`, and button styles.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
* **Bug Fixes**
* Improved bridge payment details UI with enhanced spacing, borders, and styling
* Updated wallet row display with better visual presentation when disconnected
* Refined typography and color usage across payment interface components
* Enhanced border radius and padding consistency throughout bridge widget
<sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
9e13bd0 to
56a1c0a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (8)
.changeset/yummy-squids-rush.md(1 hunks)packages/thirdweb/src/react/web/ui/Bridge/common/TokenBalanceRow.tsx(1 hunks)packages/thirdweb/src/react/web/ui/Bridge/payment-details/PaymentDetails.tsx(5 hunks)packages/thirdweb/src/react/web/ui/Bridge/payment-details/PaymentOverview.tsx(3 hunks)packages/thirdweb/src/react/web/ui/ConnectWallet/icons/OutlineWalletIcon.tsx(2 hunks)packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/StepConnector.tsx(2 hunks)packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/WalletRow.tsx(2 hunks)packages/thirdweb/src/stories/Bridge/PaymentDetails.stories.tsx(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (4)
- packages/thirdweb/src/react/web/ui/Bridge/common/TokenBalanceRow.tsx
- packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/WalletRow.tsx
- packages/thirdweb/src/react/web/ui/Bridge/payment-details/PaymentOverview.tsx
- packages/thirdweb/src/react/web/ui/Bridge/payment-details/PaymentDetails.tsx
🧰 Additional context used
📓 Path-based instructions (6)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.{ts,tsx}: Write idiomatic TypeScript with explicit function declarations and return types
Limit each TypeScript file to one stateless, single-responsibility function for clarity
Re-use shared types from@/typesor localtypes.tsbarrels
Prefer type aliases over interface except for nominal shapes in TypeScript
Avoidanyandunknownin TypeScript unless unavoidable; narrow generics when possible
Choose composition over inheritance; leverage utility types (Partial,Pick, etc.) in TypeScript
**/*.{ts,tsx}: Write idiomatic TypeScript with explicit function declarations and return types
Limit each file to one stateless, single-responsibility function for clarity and testability
Re-use shared types from @/types or local types.ts barrel exports
Prefer type aliases over interface except for nominal shapes
Avoid any and unknown unless unavoidable; narrow generics whenever possible
Choose composition over inheritance; leverage utility types (Partial, Pick, etc.)
Comment only ambiguous logic in TypeScript files; avoid restating TypeScript types and signatures in prose
Files:
packages/thirdweb/src/stories/Bridge/PaymentDetails.stories.tsxpackages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/StepConnector.tsxpackages/thirdweb/src/react/web/ui/ConnectWallet/icons/OutlineWalletIcon.tsx
packages/thirdweb/src/**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
packages/thirdweb/src/**/*.{ts,tsx}: Comment only ambiguous logic in SDK code; avoid restating TypeScript in prose
Load heavy dependencies inside async paths to keep initial bundle lean (e.g.const { jsPDF } = await import("jspdf");)Lazy-load heavy dependencies inside async paths to keep the initial bundle lean (e.g., const { jsPDF } = await import('jspdf');)
Files:
packages/thirdweb/src/stories/Bridge/PaymentDetails.stories.tsxpackages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/StepConnector.tsxpackages/thirdweb/src/react/web/ui/ConnectWallet/icons/OutlineWalletIcon.tsx
**/*.stories.tsx
📄 CodeRabbit inference engine (CLAUDE.md)
Add Storybook stories (
*.stories.tsx) alongside new UI components for documentation
Files:
packages/thirdweb/src/stories/Bridge/PaymentDetails.stories.tsx
**/*.{js,jsx,ts,tsx,json}
📄 CodeRabbit inference engine (AGENTS.md)
Biome governs formatting and linting; its rules live in biome.json. Run
pnpm fix&pnpm lintbefore committing, ensure there are no linting errors
Files:
packages/thirdweb/src/stories/Bridge/PaymentDetails.stories.tsxpackages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/StepConnector.tsxpackages/thirdweb/src/react/web/ui/ConnectWallet/icons/OutlineWalletIcon.tsx
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (AGENTS.md)
Lazy-import optional features; avoid top-level side-effects
Files:
packages/thirdweb/src/stories/Bridge/PaymentDetails.stories.tsxpackages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/StepConnector.tsxpackages/thirdweb/src/react/web/ui/ConnectWallet/icons/OutlineWalletIcon.tsx
**/*.stories.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
For new UI components, add Storybook stories (*.stories.tsx) alongside the code
Files:
packages/thirdweb/src/stories/Bridge/PaymentDetails.stories.tsx
🧬 Code graph analysis (1)
packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/StepConnector.tsx (2)
packages/thirdweb/src/react/web/ui/components/basic.tsx (1)
Container(80-193)packages/thirdweb/src/react/core/design-system/index.ts (2)
radius(156-164)iconSize(166-176)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
- GitHub Check: Size
- GitHub Check: E2E Tests (pnpm, webpack)
- GitHub Check: Unit Tests
- GitHub Check: E2E Tests (pnpm, esbuild)
- GitHub Check: Lint Packages
- GitHub Check: E2E Tests (pnpm, vite)
- GitHub Check: Build Packages
- GitHub Check: Analyze (javascript)
🔇 Additional comments (5)
.changeset/yummy-squids-rush.md (1)
1-5: LGTM!The changeset format is correct and appropriately documents this UI improvement patch.
packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/StepConnector.tsx (2)
3-6: LGTM!Good adoption of design-system tokens for consistency across the codebase.
16-17: LGTM!The visual adjustments align with design-system tokens:
- Margin adjustment from -10px to -12px
- Color token change to
secondaryTextradius.full(9999px) is semantically clearer than "100%"- Icon size increase from 16 to 20 with adjusted padding maintains visual balance
Also applies to: 25-25, 30-31, 34-34
packages/thirdweb/src/react/web/ui/ConnectWallet/icons/OutlineWalletIcon.tsx (1)
17-17: LGTM!The
styleprop forwarding enables flexible styling from parent components.packages/thirdweb/src/stories/Bridge/PaymentDetails.stories.tsx (1)
24-42: Deep-clone removal is safe; PaymentDetails component does not mutate paymentMethod prop.Review of the PaymentDetails component and PaymentOverview subcomponent confirms they only read from the
paymentMethodprop without any mutations or reassignments. Multiple stories safely reuse fixture objects (fiatPaymentMethod across 3 stories, ethCryptoPaymentMethod across 5 stories) since the component maintains immutability. Type structure verified:originTokenincludesprices: { USD: number }format as expected.
| export const OutlineWalletIcon = (props: { | ||
| size?: string; | ||
| color?: string; | ||
| style?: React.CSSProperties; | ||
| }) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
# Read the OutlineWalletIcon.tsx file
cat -n "packages/thirdweb/src/react/web/ui/ConnectWallet/icons/OutlineWalletIcon.tsx"Repository: thirdweb-dev/js
Length of output: 1800
🏁 Script executed:
# Check for React imports at the very top of the file
head -20 "packages/thirdweb/src/react/web/ui/ConnectWallet/icons/OutlineWalletIcon.tsx" | grep -n "import"Repository: thirdweb-dev/js
Length of output: 41
🏁 Script executed:
# Check the entire file for any React import
rg "import.*React" "packages/thirdweb/src/react/web/ui/ConnectWallet/icons/OutlineWalletIcon.tsx"Repository: thirdweb-dev/js
Length of output: 41
🏁 Script executed:
# View the entire file to check for any imports
wc -l "packages/thirdweb/src/react/web/ui/ConnectWallet/icons/OutlineWalletIcon.tsx"Repository: thirdweb-dev/js
Length of output: 138
🏁 Script executed:
# View the full file from beginning to end
cat "packages/thirdweb/src/react/web/ui/ConnectWallet/icons/OutlineWalletIcon.tsx"Repository: thirdweb-dev/js
Length of output: 1555
Add explicit return type and import React.
Per TypeScript guidelines, this function requires an explicit return type annotation and a React import. The code currently uses React.CSSProperties on line 7 without importing React, which will cause a type-checking error.
+import React from 'react';
+
/**
* @internal
*/
-export const OutlineWalletIcon = (props: {
+export const OutlineWalletIcon = (props: {
size?: string;
color?: string;
style?: React.CSSProperties;
-}) => {
+}): JSX.Element => {🤖 Prompt for AI Agents
packages/thirdweb/src/react/web/ui/ConnectWallet/icons/OutlineWalletIcon.tsx
lines 4-8: the component uses React types but doesn't import React and lacks an
explicit return type; add an import for React (e.g. import React from 'react')
at the top and annotate the component with an explicit return type (for example
use React.FC<Props> or : JSX.Element) so the props typing (React.CSSProperties)
and the component signature type-check correctly.

PR-Codex overview
This PR focuses on UI improvements for the
Payment Detailscomponent and related widgets in thethirdwebproject. Enhancements include layout adjustments, styling updates, and the addition of new properties to components for better visual presentation and functionality.Detailed summary
TokenBalanceRowandPaymentOverview.WalletRowto use aContainerfor improved layout and styling.PaymentOverview.StepConnectorArrowwith new margin and padding styles.OutlineWalletIconto accept size, color, and style props.cryptoPaymentMethodandethCryptoPaymentMethodto includehasEnoughBalanceandpricesproperties.PaymentDetails, including gap adjustments and button styling changes.Summary by CodeRabbit
Bug Fixes
UI Enhancements
Docs / Examples
Other
✏️ Tip: You can customize this high-level summary in your review settings.